﻿package com.eitb.programas.ticker.rutas {
	import flash.net.*;
	public class Rutas {
		private static const RUTA_CLASIFICACIONES:String = "../../../private_data/eitbcom/rss/xmldata/";
//		private static const RUTA_CLASIFICACIONES:String = "http://www.eitb.com/public_data/rss/";
//		private static const RUTA_CLASIFICACIONES:String = "http://10.126.2.36/public_data/rss/";
		
		
		
		public function getXml(idioma:String):URLRequest {
			var request:URLRequest = new URLRequest(Rutas.RUTA_CLASIFICACIONES.concat("rss_").concat(idioma).concat(".xml"));
			var variables:URLVariables = new URLVariables();
			variables.rnd = Math.random();
			request.data = variables;
			request.method = URLRequestMethod.POST;
			request.requestHeaders.push(new URLRequestHeader("pragma", "no-cache"));
			return request;
		}
		
		public function getRss(idioma:String, clasificacion:String):String {
			return "http://10.126.2.36/rss/".concat(idioma).concat("/feed/").concat(clasificacion).concat("/");
		}
		
		public function getImagen(id:String):URLRequest {
			var request:URLRequest = new URLRequest(id);
			var variables:URLVariables = new URLVariables();
			variables.rnd = Math.random();
			request.data = variables;
			request.method = URLRequestMethod.POST;
			request.requestHeaders.push(new URLRequestHeader("pragma", "no-cache"));
			return request;
		}
		public static function getRequest(id:String):URLRequest {
			var request:URLRequest = new URLRequest(id);
			request.method = URLRequestMethod.POST;
			request.requestHeaders.push(new URLRequestHeader("pragma", "no-cache"));
			return request;
		}
	}
}
